<!--inner table-->
<template>
  <div class="tb_inner_box">
    <el-form
      :inline="true"
      :model="listQuery"
      class="listQuery_form"
      size="small"
    >
      <el-form-item label="搜索内容">
        <el-input v-model="listQuery.content" placeholder="司机姓名手机" />
      </el-form-item>
      <el-form-item label="微信状态">
        <el-select v-model="listQuery.status" placeholder="微信状态">
          <el-option
            v-for="(item, index) in weixinStatus"
            :key="index"
            :label="item.name"
            :value="item.value"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="谈车进度">
        <el-select v-model="listQuery.progress" placeholder="谈车进度">
          <el-option
            v-for="item in talkCarProgress"
            :key="item.value"
            :label="item.name"
            :value="item.value"
          ></el-option>
        </el-select>
      </el-form-item>
    </el-form>
    <el-table :data="tableData" :border="true" style="width: 100%">
      <el-table-column type="selection" label="全选"> </el-table-column>
      <el-table-column type="index" label="序号">
        <template slot-scope="scope">
          {{ scope.$index }}
        </template>
      </el-table-column>
      <el-table-column label="最后操作时间">
        <template slot-scope="scope">
          {{ scope.row.test }}
        </template>
      </el-table-column>
      <el-table-column label="车长车型">
        <template slot-scope="scope">
          {{ scope.row.test }}
        </template>
      </el-table-column>
      <el-table-column label="司机姓名手机">
        <template slot-scope="scope">
          {{ scope.row.test }}
        </template>
      </el-table-column>
      <el-table-column label="车主报价">
        <template slot-scope="scope">
          {{ scope.row.test }}
        </template>
      </el-table-column>
      <el-table-column label="统计信息">
        <template slot-scope="scope">
          {{ scope.row.test }}
        </template>
      </el-table-column>
      <el-table-column label="微信状态">
        <template slot-scope="scope">
          {{ scope.row.test }}
        </template>
      </el-table-column>
      <el-table-column label="备注">
        <template slot-scope="scope">
          {{ scope.row.test }}
        </template>
      </el-table-column>
      <el-table-column label="谈车进度">
        <template slot-scope="scope">
          {{ scope.row.test }}
        </template>
      </el-table-column>
      <el-table-column label="操作按钮">
        <template slot-scope="scope">
          <el-button type="text" @click="showInnerAction">test</el-button>
        </template>
      </el-table-column>
    </el-table>
    <Dialog :isShow.sync="dialogVisible" :title="title">
      <template slot="content">
        <Detail @handleInnerAction="handleAction" />
      </template>
    </Dialog>
    <Dialog :isShow.sync="dialogEditVisible" :title="title">
      <template slot="content">
        <Edit @handleInnerAction="handleAction" />
      </template>
    </Dialog>
  </div>
</template>
<script>
import Dialog from '@/components/dialog';
import Edit from './edit';
import Detail from './detail';
import { talkCarProgress, weixinStatus } from '@/config/index';
weixinStatus.unshift({ name: '全部', value: '' });
talkCarProgress.unshift({ name: '全部', value: '' });

const listQuery = {

};
export default {
  components: {
    Dialog,
    Detail,
    Edit,
  },
  data () {
    return {
      listQuery: Object.assign({}, listQuery),
      weixinStatus: weixinStatus,
      talkCarProgress: talkCarProgress,
      tableData: [{ test: "test" }],
      title: '待确认订单',
      dialogVisible: false,
      dialogEditVisible: false,
    }
  },
  methods: {
    showInnerAction () {
      this.dialogVisible = true;
    },
    handleAction (row) {
      const { which } = row;
      console.log(which)
      switch (which) {
        case 'edit':
          this.dialogEditVisible = true;
          break;
      }
    }
  }
}
</script>
<style lang="scss" scoped>
.tb_inner_box {
  padding: 0;
  .el-table {
  }
  .el-form {
  }
}
</style>
